package com.kelly.excel;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;

public class ReadCellValue {

	public static String readCellValue(Cell cell){
		if(cell==null){
			return "";
		}
		CellType cellType = cell.getCellTypeEnum();
		switch (cellType) {
		case BLANK:
			return "";
		case NUMERIC:
			return String.valueOf(cell.getNumericCellValue());
		default:
			return cell.getStringCellValue();
		}
	}
}
